﻿using WFBot.Data.Repository;
using Xunit;

namespace WFBot.Data.Tests
{
    public class QuestionRepositoryTests : DatabaseTest
    {
        private readonly QuestionRepository _questionRepository;

        public QuestionRepositoryTests()
        {
            _questionRepository = new QuestionRepository(databasefactory);
        }

        [Fact]
        public void Should_Add_Question()
        {
            var question = Factory.CreateQuestion();
            _questionRepository.Add(question);
            unitOfWork.Commit();

            Assert.NotEqual(question.Id, 0);
        }
    }
}
